package com.ronx.scs.service;


import com.ronx.scs.dao.UserDAO;
import com.ronx.scs.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Service(value = "user")
//@WebService(
//        name = "User",
//        serviceName = "UserService"
//)
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDAO userDAO;

    @PostConstruct
    public void init() throws Exception {
    }

    @PreDestroy
    public void destroy() {
    }

    public void add(User user) {
        userDAO.add(user);
    }

    public void update(User user) {
        userDAO.update(user);
    }

    public void delete(User user) {
        userDAO.delete(user);
    }

//    public User getById(Long id) {
//        return UserDAO.getById(id);
//    }
//
//    public TLinkedList<User> getAll() {
//        return UserDAO.getAll();
//    }
}
